package controleur;

import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import vue.BilanDeLaJrnee;

public class BilanController {

	private BilanDeLaJrnee bilan;
	
	public BilanController(BilanDeLaJrnee bilan){
		this.bilan=bilan;
		retour();
	}

	public void retour(){
		bilan.getBtnRetour().addActionListener(new BoutonRetourListener());
	}
	
	
	class BoutonRetourListener implements ActionListener{

		@Override
		public void actionPerformed(ActionEvent e) {
			// TODO Auto-generated method stub
			CardLayout c1= (CardLayout)bilan.getParent().getLayout();
			c1.previous(bilan.getParent());
		}
		
	}
}
